<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// 
//  likelist.php
//  phpweb
//  
//  Created by WillLee on 2011-07-06.
//  Copyright 2011 lishuzu. All rights reserved.
// 


class Worktype extends CI_Controller {

	function __construct()
	{
		parent::__construct();
		
 		$this->load->model('common/security_model');
		if($this->security_model->isLogin() === FALSE){
			showmessage('请登录', 'login', 2);
		}
 		$this->load->model('worktype_model');
	}
	
	//最新作品
	public function newwork()
	{	
		$type = 'newwork';
		$data = $this->worktype_model->get_works($type);
		$data['title'] = '最新商品';
		$this->load->template('worktype_tpl', $data);
	}
	//推荐作品
	public function recommend()
	{	
		$type = 'recommend';
		$data = $this->worktype_model->get_works($type);
		$data['title'] = '推荐作品';
		$this->load->template('worktype_tpl', $data);
	}
	// 热卖作品
	public function hotsold()
	{	
		$type = 'hotsold';
		$data = $this->worktype_model->get_works($type);
		$data['title'] = '热卖作品';
		$this->load->template('worktype_tpl', $data);
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */